//
//  TopView.swift
//  Sinaweibo
//
//  Created by 谌桃 on 15/12/3.
//  Copyright © 2015年 ryan.chen. All rights reserved.
//

import UIKit
import SnapKit

class TopView: UIView {

    override init(frame: CGRect) {
        super.init(frame: frame)
    }

    required init?(coder aDecoder: NSCoder) {
//        fatalError("init(coder:) has not been implemented")
       super.init(coder: aDecoder)
    }
    
    //设置UI
    private func setupUI(){
    
        //添加
        addSubview(topView)
        
        //布局
        topView.snp_makeConstraints { (make) -> Void in
            
            make.top.left.right.equalTo(self)
//            make.bottom.equalTo(headImage.snp_top)
        }
        
    }

    //懒加载子控件
    private lazy var topView:UIImageView = {
        
            let topview = UIImageView()
        
            topview.backgroundColor = UIColor.redColor()
        
        return topview
        }()

}
